import request from '@/utils/request'

// 根据条件查询有号的部门
export function listDeptForScheduling(queryParams) {
  return request({
    url: '/doctor/registration/listDeptForScheduling',
    params: queryParams,
    method: 'get'
  })
}
// 根据身份证号查询患者信息
export function getPatientByIdCard(idCard) {
  return request({
    url: '/doctor/registration/getPatientByIdCard/' + idCard,
    method: 'get'
  })
}

// 添加挂号信息
export function addRegistration(registrationFormDto) {
  return request({
    url: '/doctor/registration/addRegistration',
    method: 'post',
    data: registrationFormDto
  })
}

// 收费
export function collectFee(regId) {
  return request({
    url: '/doctor/registration/collectFee/' + regId,
    method: 'post'
  })
}

// 分页查询挂号信息
export function queryRegistrationForPage(query) {
  return request({
    url: '/doctor/registration/queryRegistrationForPage',
    method: 'get',
    params: query
  })
}
// 作废
export function doInvalid(registrationId) {
  return request({
    url: '/doctor/registration/doInvalid/' + registrationId,
    method: 'post'
  })
}
// 退号
export function doReturn(registrationId) {
  return request({
    url: '/doctor/registration/doReturn/' + registrationId,
    method: 'post'
  })
}

